pkgname=vdr-reelchannelscan
pkgver=0.4.1
pkgrel=1
arch=('i686')
pkgdesc="A VDR plugin that scans satellites for channels"
url="http://www.reel-multimedia.com/"
license=('GPL')
depends=('vdr' 'gcc')
source=(http://www.reelbox.org/software/source/vdr-plugins/$pkgname-$pkgver.tgz \
	vdr-reelchannelscan-path.diff)
md5sums=('0e9cf9f4d92d3ca5ea8986a28079d21e' '1d12c992cf6537d05def0ecdfa940ce4')

build() {
  cd $startdir/src/reelchannelscan-$pkgver

  patch -Np1 -i $startdir/src/vdr-reelchannelscan-path.diff || return 1

  sed -i \
	 -e 's:@cp $@ :install -D -m 755 $@ $(DESTDIR):' \
	 -e 's:-I$(VDRDIR)/include:-I$(VDRDIR):' \
	 Makefile
  make VDRDIR=/usr/include/vdr LIBDIR=/usr/lib/vdr DESTDIR=$startdir/pkg all || return 1

  install -m 755 -d $startdir/pkg/etc/vdr/plugins/reelchannelscan
  install -m 644 transponders/*.tpl $startdir/pkg/etc/vdr/plugins/reelchannelscan
}
